home *** CD-ROM | disk | FTP | other *** search
- Path: Rezonet.net!news
- From: ray@ultimate-tech.com (Ray Dunn)
- Newsgroups: comp.lang.c
- Subject: Re: Problem with stringcopy
- Date: 8 Jan 1996 05:17:47 GMT
- Organization: Ultimate Technographics Inc.
- Message-ID: <4cq9dr$if9@ns.RezoNet.NET>
- References: <4clguu$9fs@eagle.novo.dk> <820933963snz@genesis.demon.co.uk>
- NNTP-Posting-Host: 204.19.230.7
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- In referenced article, Lawrence Kirby says...
- >Morten Brun writes:
- >
- >>How do i do a partial stringcopy i.e. copy from a specific position
- >>in a string and a certain numbers of bytes. I am looking for a
- >>function like target = Stringcopy(source, startpos, length)
- >
- >target[0] = '\0';
- >strncat(target, source+startpos, length);
-
- ...but use strncpy if you are overwriting some existing characters in
- target and don't want the target string to terminate after the copied
- characters.
- --
- Ray Dunn (opinions are my own) | Phone: (514) 938 9050
- Montreal | Phax : (514) 938 5225
- ray@ultimate-tech.com | Home : (514) 630 3749
-
-